<template>
  <div class="count">
    <h3>我是count组件{{ count }}</h3>
    <button @click="count++">更新</button>
    <button @click="$destroy()">把我自己给卸了</button>
    <!-- 使用全局自定义指令 -->
    <button v-role="'superAdmin'">新增</button>
    <button v-role="'superAdmin'">删除</button>
    <button v-role="'admin'">修改</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      count: 0
    }
  }
}
</script>

<style scoped>
.count {
  background-color: rgb(167, 224, 195);
}
</style>